package com.gree.syq.wifidemo;

import android.os.Handler;
import android.os.HandlerThread;
import android.util.Log;
import android.widget.TextView;

public class DemoLog {
    private static final String TAG = "DemoLog";
    private static TextView mTextView;
    private static DemoLog sInstance;
    private long time = System.currentTimeMillis();

    private Handler handler = new Handler();
    public static DemoLog getInstance() {
        if(sInstance == null) {
            sInstance =  new DemoLog();
        }
        return sInstance;
    }

    protected DemoLog() {
    }

    public void setTextView(TextView textView) {
        mTextView = textView;
    }

    public void logi(String msg) {
        Log.i(TAG, "logi: " + msg);
        /*
        handler.post(new Runnable() {
            @Override
            public void run() {
                mTextView.append((System.currentTimeMillis() - time) + ":" + msg + "\n");
                time = System.currentTimeMillis();
            }
        });
        */
    }

    public void clean() {

    }
}
